// 添加班级完成按钮点击事件

function addTeam() {
    console.log('正在添加班级');
    gradeList();
    teacherList();
    $('#save').click(function () {
        if(!$('#grade_id').val()) return alert('请选择年级');
        if(!$('#coach_teacher_id').val()) return alert('请选择辅导老师');
        $.ajax({
            url: http_url + 'Team/add',
            type: 'POST',
            data: {
                token: sessionStorage.token,
                grade_id: $('#grade_id').val(),
                coach_teacher_id: $('#coach_teacher_id').val(),
            },
            success: function (response) {
                if (response.code == 0){
                    alert('添加成功');
                }
            }
        })
    });
}
